package com.kaiwu.tc.demo.controller;

import com.kaiwu.tc.demo.service.IDemoService;
import com.kaiwu.tc.mvcframework.annotations.Autowired;
import com.kaiwu.tc.mvcframework.annotations.Controller;
import com.kaiwu.tc.mvcframework.annotations.RequestMapping;
import com.kaiwu.tc.mvcframework.annotations.Security;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
@RequestMapping("/demo")
@Security({"a", "b", "c"})
public class DemoController {

    @Autowired
    private IDemoService demoService;

    @RequestMapping("/query")
    public String query(HttpServletRequest request, HttpServletResponse response, String username) {
        return demoService.get(username);
    }

}
